<?xml version="1.0" encoding="ISO-8859-15"?>
<!-- DOC - TP SVG -->
<!--histo.xsl -->
<xsl:stylesheet version="1.0"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:output method="xml" version="1.0" indent="yes"
		encoding="UTF-8" doctype-system="http://www.w3.org/TR/2001/PR-SVG-20010719/DTD/svg10.dtd"
		media-type="image/svg" doctype-public="-//W3C//DTD SVG 1.0//EN" />

	<!-- Produire un fichier SVG -->
	<xsl:template name="for.loop">
		<xsl:param name="i" />
		<xsl:param name="count" />
		<xsl:param name="total" />
		<!--begin_: Line_by_Line_Output -->
		<xsl:if test="$i &lt;= $count">
			<p>Coucou</p>
		</xsl:if>
		<!-- Aide pour http://quomon.com/question-How-to-make-a-for-loop-in-xslt-not-for-each-809.aspx -->
		<!--begin_: RepeatTheLoopUntilFinished -->
		<xsl:if test="$i &lt;= $count">
			<xsl:call-template name="for.loop">
				<xsl:with-param name="i">
					<xsl:value-of select="$i + 1" />
				</xsl:with-param>
				<xsl:with-param name="count">
					<xsl:value-of select="$count" />
				</xsl:with-param>
			</xsl:call-template>
		</xsl:if>

	</xsl:template>
	<xsl:template match="films">
		<html>
			<head>
			</head>
			<body>
				<svg xmlns:svg="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
					width="auto" height="200">
					<defs>
						<g id="barre">
							<line x1="25" y1="0" x2="25" y2="130"
								style="stroke: black; stroke-opacity: 1; stroke-width: 2; fill: #9dc2de" />
							<line x1="20" y1="10" x2="30" y2="10"
								style="stroke: black; stroke-opacity: 1; stroke-width: 2; fill: #9dc2de" />
							<text x="0" y="13" font-size="11">60</text>
							<line x1="20" y1="30" x2="30" y2="30"
								style="stroke: black; stroke-opacity: 1; stroke-width: 2; fill: #9dc2de" />
							<text x="0" y="33" font-size="11">50</text>
							<line x1="20" y1="50" x2="30" y2="50"
								style="stroke: black; stroke-opacity: 1; stroke-width: 2; fill: #9dc2de" />
							<text x="0" y="53" font-size="11">40</text>
							<line x1="20" y1="70" x2="30" y2="70"
								style="stroke: black; stroke-opacity: 1; stroke-width: 2; fill: #9dc2de" />
							<text x="0" y="73" font-size="11">30</text>
							<line x1="20" y1="90" x2="30" y2="90"
								style="stroke: black; stroke-opacity: 1; stroke-width: 2; fill: #9dc2de" />
							<text x="0" y="93" font-size="11">20</text>
							<line x1="20" y1="110" x2="30" y2="110"
								style="stroke: black; stroke-opacity: 1; stroke-width: 2; fill: #9dc2de" />
							<text x="0" y="113" font-size="11">10</text>
							<line x1="20" y1="130" x2="30" y2="130"
								style="stroke: black; stroke-opacity: 1; stroke-width: 2; fill: #9dc2de" />
							<text x="0" y="133" font-size="11">0</text>
						</g>
					</defs>
					<xsl:variable name="total">
						0
					</xsl:variable>

					<use xlink:href="#barre" />
					<xsl:call-template name="for.loop">
						<xsl:with-param name="i">
							1
						</xsl:with-param>
						<xsl:with-param name="count">
							<xsl:value-of select="count(//year)"/>
						</xsl:with-param>
						<xsl:with-param name="total">
							$total
						</xsl:with-param>
					</xsl:call-template>

				</svg>
				<!-- <xsl:value-of select="sum(year[@value &gt;= 1920 and @value &lt; 
					1930]/@number_films)" /> <xsl:value-of select="sum(year[@value &gt;= 1930 
					and @value &lt; 1940]/@number_films)" /> <xsl:value-of select="sum(year[@value 
					&gt;= 1940 and @value &lt; 1950]/@number_films)" /> <xsl:value-of select="sum(year[@value 
					&gt;= 1950 and @value &lt; 1960]/@number_films)" /> <xsl:value-of select="sum(year[@value 
					&gt;= 1970 and @value &lt; 1980]/@number_films)" /> <xsl:value-of select="sum(year[@value 
					&gt;= 1980 and @value &lt; 1990]/@number_films)" /> <xsl:value-of select="sum(year[@value 
					&gt;= 1990 and @value &lt; 2000]/@number_films)" /> <xsl:value-of select="sum(year[@value 
					&gt;= 2000 and @value &lt; 2010]/@number_films)" /> -->
			</body>
		</html>
	</xsl:template>
</xsl:stylesheet>